<template>
    <div class="invoiceIssuance">
        <div class="headerBox">
            <van-icon size=".48rem" color="#000000" name="arrow-left" style="margin-left: .15rem;"
                @click="backPage()" />
            <van-icon size=".48rem" color="#000000" name="cross" style="margin-left: .15rem;" />
            <span class="title-span" @click="ListClick()">发票开具</span>
            <img class="bgImg" src="../../../assets/images/invoice/issuance01.png" alt="">
        </div>
        <div class="content">
            <p class="titile-p">发票详情</p>
            <img class="itemtxt" src="../../../assets/images/invoice/issuance02.png" alt="">
            <div class="clickdiv">
                <img v-if="status01" class="itemtxt" src="../../../assets/images/invoice/issuance03.png" alt="">
                <img v-if="status02" class="itemtxt" src="../../../assets/images/invoice/issuance05.png" alt="">
                <img v-if="status03" class="itemtxt" src="../../../assets/images/invoice/issuance06.png" alt="">
                <span @click="clickWrite()"></span>
            </div>

            <p class="titile-p">接受方式</p>
            <img v-if="status04" class="itemtxt" src="../../../assets/images/invoice/issuance04.png" alt="">
            <img v-if="status05" class="itemtxt" src="../../../assets/images/invoice/issuance04-4.png" alt="">
        </div>
        <div class="footer" v-if="btnShow">
            <button>取消</button>
            <button @click="okBtn()">确认开具</button>
        </div>
    </div>
</template>
<script>
export default {
    name: 'invoiceIssuance',
    data() {
        return {
            btnShow:true,
            status01: true,
            status02: false,
            status03: false,
            status04: true,
            status05: false,
        }
    },
    methods: {
        //返回
        backPage() {
            this.$router.push("/invoiceAnce");
        },
        // resetBtn() {
        //     this.status01 = false
        //     this.status02 = false
        //     this.status03 = true

        //     this.status04 = false
        //     this.status05 = true

        // },
        ListClick() {
            this.btnShow = false

            this.status01 = false
            this.status02 = false
            this.status03 = true

            this.status04 = false
            this.status05 = true

            setTimeout(() => {
                this.btnShow = true
            },100)
        },
        okBtn() {
            this.$toast.success('提交成功');

            setTimeout(() => {
                this.$router.push("/invoiceAnce2");
            }, 1000)

        },
        clickWrite() {

            this.btnShow = false


            this.status01 = false
            this.status02 = true
            this.status03 = false

            this.status04 = true
            this.status05 = false

            setTimeout(() => {
                this.btnShow = true
            }, 100)
        }
    }
}
</script>
<style lang="less" scoped>
.invoiceIssuance {
    width: 100%;
    height: 100%;
    overflow: auto;

    .headerBox {
        position: relative;
        width: 100%;
        height: .88rem;
        line-height: .88rem;
        background: linear-gradient(180deg, #E2F0FF 0%, #F7F8F9 100%);

        .title-span {
            font-weight: bold;
            font-size: 0.36rem;
            color: #000;
            margin-left: 1.66rem;
        }

        img.bgImg {
            width: 2.36rem;
            height: 2.61rem;
            position: absolute;
            right: 0;
        }
    }

    .titile-p {
        width: auto;
        height: .33rem;
        margin: 0.4rem 0.6rem 0.2rem 0.6rem;
        font-size: 0.28rem;
        color: #333333;
    }

    .footer {
        width: 100%;
        height: auto;
        text-align: center;
        margin-bottom: .4rem;

        button:first-child {
            width: 3.34rem;
            height: 0.8rem;
            background: #E1EDF9;
            border-radius: 0.2rem;
            border: none;
            // opacity: 0.1;
            font-size: 0.32rem;
            color: #2892FF;
        }

        button:last-child {
            width: 3.34rem;
            height: 0.8rem;
            background: #2892FF;
            border-radius: 0.2rem;
            border: none;
            font-size: 0.32rem;
            color: white;
            margin-left: 0.22rem;
        }
    }

    .content {
        .itemtxt {
            width: 6.9rem;
            margin: 0 0.3rem;
        }

        .clickdiv {
            width: 100%;
            height: auto;
            position: relative;

            span {

                position: absolute;
                width: 1.5rem;
                height: 0.8rem;
                // background: red;
                bottom: 0.35rem;
                right: 3rem;
                z-index: 2;
            }
        }
    }
}
</style>
